package com.ruoyi.project.video.livetextcontent.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.video.livetextcontent.mapper.LivetextcontentMapper;
import com.ruoyi.project.video.livetextcontent.domain.Livetextcontent;
import com.ruoyi.project.video.livetextcontent.service.ILivetextcontentService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 图文直播内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-25
 */
@Service
public class LivetextcontentServiceImpl implements ILivetextcontentService 
{
    @Autowired
    private LivetextcontentMapper livetextcontentMapper;

    /**
     * 查询图文直播内容
     * 
     * @param ContentID 图文直播内容主键
     * @return 图文直播内容
     */
    @Override
    public Livetextcontent selectLivetextcontentByContentID(Long ContentID)
    {
        return livetextcontentMapper.selectLivetextcontentByContentID(ContentID);
    }

    /**
     * 查询图文直播内容列表
     * 
     * @param livetextcontent 图文直播内容
     * @return 图文直播内容
     */
    @Override
    public List<Livetextcontent> selectLivetextcontentList(Livetextcontent livetextcontent)
    {
        return livetextcontentMapper.selectLivetextcontentList(livetextcontent);
    }

    /**
     * 新增图文直播内容
     * 
     * @param livetextcontent 图文直播内容
     * @return 结果
     */
    @Override
    public int insertLivetextcontent(Livetextcontent livetextcontent)
    {
        return livetextcontentMapper.insertLivetextcontent(livetextcontent);
    }

    /**
     * 修改图文直播内容
     * 
     * @param livetextcontent 图文直播内容
     * @return 结果
     */
    @Override
    public int updateLivetextcontent(Livetextcontent livetextcontent)
    {
        return livetextcontentMapper.updateLivetextcontent(livetextcontent);
    }

    /**
     * 批量删除图文直播内容
     * 
     * @param ContentIDs 需要删除的图文直播内容主键
     * @return 结果
     */
    @Override
    public int deleteLivetextcontentByContentIDs(String ContentIDs)
    {
        return livetextcontentMapper.deleteLivetextcontentByContentIDs(Convert.toStrArray(ContentIDs));
    }

    /**
     * 删除图文直播内容信息
     * 
     * @param ContentID 图文直播内容主键
     * @return 结果
     */
    @Override
    public int deleteLivetextcontentByContentID(Long ContentID)
    {
        return livetextcontentMapper.deleteLivetextcontentByContentID(ContentID);
    }
}
